package com.ada.service;

import com.ada.service.bean.ConsumerComponent;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.io.IOException;

public class DubboConsumerMain {
    //public static void main(String[] args) throws IOException {
    //    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
    //    context.start();
    //    //获取消费者组件
    //    ConsumerComponent consumerComponent= context.getBean(ConsumerComponent.class);
    //    while (true){
    //        System.in.read();
    //        String world = consumerComponent.sayHello1("world");
    //        System.out.println("result "+ world);
    //        String world2 = consumerComponent.sayHello2("world");
    //        System.out.println("result2 "+ world2);
    //    }
    //
    //}

    //@Configuration
    //@EnableDubbo
    //@PropertySource("classpath:/application.properties")
    //@ComponentScan(basePackages = "com.ada.service.bean")
    //static class ConsumerConfiguration {
    //
    //}
}
